package team.zero.lemon.common.utils;

/**
 * Created by bolin on 2016/5/25.
 */
public class BitComput {
    public static long pro(Long value, String option) {
        if (value == null) {
            return 0;
        }
        if ("".equals(option)) {
            return 0;
        }
        String[] op = option.split("\\|");
        return (value >> Integer.parseInt(op[0])) & ((long) (Math.pow(2, Integer.parseInt(op[1])) - 1));
    }
}
